<div class="row">

    <div class="col-md-12">      		
    	
    	<div class="widget stacked ">
    		<div class="widget-header">
                <i class="icon-list"></i>
                <h3><?php echo isset($title_for_layout)?$title_for_layout:$this->l('Read a message'); ?></h3>
            </div> <!-- /.widget-header -->

            <div class="widget-content">
            	<div class="col-sm-10">
                            <a class="btn btn-default" href="<?php echo site_url('Patient/Message/reply/'.$message[0]->id_message) ?>"><?php echo $this->l('Reply'); ?></a>
                            <a class="btn btn-info" href="<?php echo site_url('Patient/Message/inbox/') ?>"><?php echo $this->l('Back to inboxes messages'); ?></a>
                    </div>
                <div class="clearfix"></div>
            	<section id="tables">
                    <div class="page-header">
                        <h3><?php echo $title; echo ($message[0]->sender == 'patient' ? $this->l('to').' '.$message[0]->doctor_name : (($message[0]->sender == 'doctor') ? $this->l('from').' '.$message[0]->doctor_name : $this->l('to').' '.$message[0]->patient_name)); ?></h3>
                    </div>
                    <div class="clearfix"></div>
                    <dl class="dl-horizontal">
                        <dt><?php echo $this->l('Sender'); ?></dt><dd><?php echo ($message[0]->sender == 'patient' ? $message[0]->patient_name : (($message[0]->sender == 'doctor') ? $message[0]->doctor_name : $message[0]->patient_name)); ?></dd>
                        <dt><?php echo $this->l('Context'); ?></dt><dd><?php echo $message[0]->context; ?></dd>
                        <dt><?php echo $this->l('Email'); ?></dt><dd><?php echo $message[0]->doctor_email; ?></dd>
                        <dt><?php echo $this->l('Date'); ?></dt><dd><?php $date = date_create_from_format('Y-m-d H:i:s', $message[0]->date_add);
                                                                            echo date_format($date, 'd F Y').' at ';
                                                                            echo date_format($date, 'H:i A'); ; ?></dd>
                        <dt><?php echo $this->l('Message'); ?></dt><dd><?php echo $message[0]->message; ?></dd>
                      
                    </dl>
                    
                </section>	
    		</div> <!-- /widget-content -->
    			
    	</div> <!-- /widget -->
    	
    </div> <!-- /span12 -->

</div> <!-- /row -->
